package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.MemberWalletEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员钱包 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberWalletQuery extends MemberWalletEntity implements Query<MemberWalletEntity> {

    /** 会员钱包ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 支付密码（无密码不可支付）查询条件 */
	@JsonUnwrapped(prefix = "payPassword")
	private Condition<String> payPasswordCondition;

    /** 连续支付错误次数查询条件 */
	@JsonUnwrapped(prefix = "pwdErrorNo")
	private Condition<Integer> pwdErrorNoCondition;

    /** 悦币余额查询条件 */
	@JsonUnwrapped(prefix = "yueCoin")
	private Condition<BigDecimal> yueCoinCondition;

    /** 微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件 */
	@JsonUnwrapped(prefix = "wechat")
	private Condition<BigDecimal> wechatCondition;

    /** 支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件 */
	@JsonUnwrapped(prefix = "alipay")
	private Condition<BigDecimal> alipayCondition;

    /** 版本查询条件 */
	@JsonUnwrapped(prefix = "version")
	private Condition<Integer> versionCondition;

    /** 最后支付时间查询条件 */
	@JsonUnwrapped(prefix = "lastPayTime")
	private Condition<LocalDateTime> lastPayTimeCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberWalletQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberWalletQuery(MemberWalletEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberWalletQuery(MemberWalletQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.payPasswordCondition != null) {
			this.payPasswordCondition = other.payPasswordCondition.copy();
		}
		if(other.pwdErrorNoCondition != null) {
			this.pwdErrorNoCondition = other.pwdErrorNoCondition.copy();
		}
		if(other.yueCoinCondition != null) {
			this.yueCoinCondition = other.yueCoinCondition.copy();
		}
		if(other.wechatCondition != null) {
			this.wechatCondition = other.wechatCondition.copy();
		}
		if(other.alipayCondition != null) {
			this.alipayCondition = other.alipayCondition.copy();
		}
		if(other.versionCondition != null) {
			this.versionCondition = other.versionCondition.copy();
		}
		if(other.lastPayTimeCondition != null) {
			this.lastPayTimeCondition = other.lastPayTimeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberWalletEntity> toQueryWrapper() {
		QueryWrapper<MemberWalletEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (payPasswordCondition != null) {
			payPasswordCondition.toWrapper(wrapper, COL_PAY_PASSWORD);
		}
		if (pwdErrorNoCondition != null) {
			pwdErrorNoCondition.toWrapper(wrapper, COL_PWD_ERROR_NO);
		}
		if (yueCoinCondition != null) {
			yueCoinCondition.toWrapper(wrapper, COL_YUE_COIN);
		}
		if (wechatCondition != null) {
			wechatCondition.toWrapper(wrapper, COL_WECHAT);
		}
		if (alipayCondition != null) {
			alipayCondition.toWrapper(wrapper, COL_ALIPAY);
		}
		if (versionCondition != null) {
			versionCondition.toWrapper(wrapper, COL_VERSION);
		}
		if (lastPayTimeCondition != null) {
			lastPayTimeCondition.toWrapper(wrapper, COL_LAST_PAY_TIME);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回会员钱包ID查询条件
	 * 
	 * @return idCondition 会员钱包ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取会员钱包ID查询条件
	 * 
	 * @return idCondition 会员钱包ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置会员钱包ID查询条件
	 * 
	 * @param idCondition 会员钱包ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回支付密码（无密码不可支付）查询条件
	 * 
	 * @return payPasswordCondition 支付密码（无密码不可支付）查询条件
	 */
	public Condition<String> payPassword() {
		this.payPasswordCondition = new Condition<>();
		return this.payPasswordCondition;
	}
	
	/**
	 * 获取支付密码（无密码不可支付）查询条件
	 * 
	 * @return payPasswordCondition 支付密码（无密码不可支付）查询条件
	 */
	public Condition<String> getPayPasswordCondition() {
		return payPasswordCondition;
	}

	/**
	 * 设置支付密码（无密码不可支付）查询条件
	 * 
	 * @param payPasswordCondition 支付密码（无密码不可支付）查询条件
	 */
	public void setPayPasswordCondition(Condition<String> payPasswordCondition) {
		this.payPasswordCondition = payPasswordCondition;
	}

	/**
	 * 构造并返回连续支付错误次数查询条件
	 * 
	 * @return pwdErrorNoCondition 连续支付错误次数查询条件
	 */
	public Condition<Integer> pwdErrorNo() {
		this.pwdErrorNoCondition = new Condition<>();
		return this.pwdErrorNoCondition;
	}
	
	/**
	 * 获取连续支付错误次数查询条件
	 * 
	 * @return pwdErrorNoCondition 连续支付错误次数查询条件
	 */
	public Condition<Integer> getPwdErrorNoCondition() {
		return pwdErrorNoCondition;
	}

	/**
	 * 设置连续支付错误次数查询条件
	 * 
	 * @param pwdErrorNoCondition 连续支付错误次数查询条件
	 */
	public void setPwdErrorNoCondition(Condition<Integer> pwdErrorNoCondition) {
		this.pwdErrorNoCondition = pwdErrorNoCondition;
	}

	/**
	 * 构造并返回悦币余额查询条件
	 * 
	 * @return yueCoinCondition 悦币余额查询条件
	 */
	public Condition<BigDecimal> yueCoin() {
		this.yueCoinCondition = new Condition<>();
		return this.yueCoinCondition;
	}
	
	/**
	 * 获取悦币余额查询条件
	 * 
	 * @return yueCoinCondition 悦币余额查询条件
	 */
	public Condition<BigDecimal> getYueCoinCondition() {
		return yueCoinCondition;
	}

	/**
	 * 设置悦币余额查询条件
	 * 
	 * @param yueCoinCondition 悦币余额查询条件
	 */
	public void setYueCoinCondition(Condition<BigDecimal> yueCoinCondition) {
		this.yueCoinCondition = yueCoinCondition;
	}

	/**
	 * 构造并返回微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 * 
	 * @return wechatCondition 微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 */
	public Condition<BigDecimal> wechat() {
		this.wechatCondition = new Condition<>();
		return this.wechatCondition;
	}
	
	/**
	 * 获取微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 * 
	 * @return wechatCondition 微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 */
	public Condition<BigDecimal> getWechatCondition() {
		return wechatCondition;
	}

	/**
	 * 设置微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 * 
	 * @param wechatCondition 微信余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 */
	public void setWechatCondition(Condition<BigDecimal> wechatCondition) {
		this.wechatCondition = wechatCondition;
	}

	/**
	 * 构造并返回支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 * 
	 * @return alipayCondition 支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 */
	public Condition<BigDecimal> alipay() {
		this.alipayCondition = new Condition<>();
		return this.alipayCondition;
	}
	
	/**
	 * 获取支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 * 
	 * @return alipayCondition 支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 */
	public Condition<BigDecimal> getAlipayCondition() {
		return alipayCondition;
	}

	/**
	 * 设置支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 * 
	 * @param alipayCondition 支付宝余额（没使用过则为0.00，使用过10元则为-10.00）查询条件
	 */
	public void setAlipayCondition(Condition<BigDecimal> alipayCondition) {
		this.alipayCondition = alipayCondition;
	}

	/**
	 * 构造并返回版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> version() {
		this.versionCondition = new Condition<>();
		return this.versionCondition;
	}
	
	/**
	 * 获取版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> getVersionCondition() {
		return versionCondition;
	}

	/**
	 * 设置版本查询条件
	 * 
	 * @param versionCondition 版本查询条件
	 */
	public void setVersionCondition(Condition<Integer> versionCondition) {
		this.versionCondition = versionCondition;
	}

	/**
	 * 构造并返回最后支付时间查询条件
	 * 
	 * @return lastPayTimeCondition 最后支付时间查询条件
	 */
	public Condition<LocalDateTime> lastPayTime() {
		this.lastPayTimeCondition = new Condition<>();
		return this.lastPayTimeCondition;
	}
	
	/**
	 * 获取最后支付时间查询条件
	 * 
	 * @return lastPayTimeCondition 最后支付时间查询条件
	 */
	public Condition<LocalDateTime> getLastPayTimeCondition() {
		return lastPayTimeCondition;
	}

	/**
	 * 设置最后支付时间查询条件
	 * 
	 * @param lastPayTimeCondition 最后支付时间查询条件
	 */
	public void setLastPayTimeCondition(Condition<LocalDateTime> lastPayTimeCondition) {
		this.lastPayTimeCondition = lastPayTimeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
